import 'package:better_player/better_player.dart';
import 'package:flutter/cupertino.dart';

/// <summary>
/// author：zwb
/// dateTime： 2022/1/18 16:30
/// filePath： lib/page_common/show_hls_video_page.dart
/// desc: 用于播放 HLS 类型的直播视频
/// <summary>
///
class ShowHLSVideoPage extends StatefulWidget {
  const ShowHLSVideoPage({Key? key}) : super(key: key);

  @override
  _ShowHLSVideoPageState createState() => _ShowHLSVideoPageState();
}

class _ShowHLSVideoPageState extends State<ShowHLSVideoPage> {
  @override
  Widget build(BuildContext context) {
    return AspectRatio(
      aspectRatio: 16 / 9,
      child: BetterPlayer.network(
        "https://open.ys7.com/v3/openlive/G57203144_1_1.m3u8?expire=1642588185&id=403616973232877568&t=834ad94109117849479200eef5045bc5d418cad1278d6cbde36c1cb7e317da4b&ev=100",
        betterPlayerConfiguration: BetterPlayerConfiguration(
          aspectRatio: 16 / 9,
        ),
      ),
    );
  }
}
